$(function (){
    $("#go").on('click',function (){
        var count = parseInt($("#page").val());
        var totalPage = parseInt($("#totalPage").val());
        if (count>=1&&count<=totalPage){
            location.href = "http://localhost:8080/dept/limit?currentPageNo="+count;
        }else {
            alert("请输入正确的页码")
        }
    })
    $("#NAME").on("blur",function (){
        $.ajax({
            type:"GET",
            url:"http://localhost:8080/job/jobIsExist/"+$("#NAME").val(),
            dataType:"JSON",
            success:function (data){
                if (data.code=='10000'){
                    $("#tishi").text(data.msg)
                }else {
                    $("#tishi").text(data.msg)
                }
            }
        })
    })
})
